package com.lunar.controller;

import com.lunar.entity.Book;
import com.lunar.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class BookControlller {

    @Autowired
    private BookService bookService;

    @RequestMapping("/getAll")
    public List<Book> getAll(){
        return bookService.getAll();
    }
}
